package me.cat.learn1.test1;

public class StringDemo1 {
    public static void main(String[] args) {
        //创建一个空白字符串对象，不含有任何内容
        String s1 = new String();
        System.out.println("s1:" + s1);
        //根据字符数组的内容，来创建字符串对象
        char[] chs = {'a', 'b', 'c'};
        String s2 = new String(chs);
        System.out.println("s2:" + s2);
        //直接赋值
        String s3 = "abc";
        System.out.println("s3:" + s3);
    }
}
